#include <iostream>
#include <time.h>
#include <stdlib.h>
using namespace std;
void kub(int a)
{
if(a==1)
{
cout<<"       \n";
cout<<"       \n";
cout<<"   *   \n";
cout<<"       \n";
cout<<"       \n";
}
if(a==2)
{
cout<<"       \n";
cout<<"   *   \n";
cout<<"       \n";
cout<<"   *   \n";
cout<<"       \n";
}
if(a==3)
{
cout<<"       \n";
cout<<" *     \n";
cout<<"   *   \n";
cout<<"     * \n";
cout<<"       \n";
}
if(a==4)
{
cout<<"       \n";
cout<<" *   * \n";
cout<<"       \n";
cout<<" *   * \n";
cout<<"       \n";
}
if(a==5)
{
cout<<"       \n";
cout<<" *   * \n";
cout<<"   *   \n";
cout<<" *   * \n";
cout<<"       \n";
}
if(a==6)
{
cout<<"       \n";
cout<<" *   * \n";
cout<<" *   * \n";
cout<<" *   * \n";
cout<<"       \n";
}
}
int gen()
{int c;
c=rand()%6+1;
return c;
}
void igra(int a)
{int num,  b=0 ;
float srednee_komp=0,   srednee_vashe=0;
if(a==2)
		{	
			b=gen();
			cout<<"y komputera vipalo             ";kub(b);cout<<"\n";;
			srednee_komp+=gen();
		}
for(int i=0;i<5;i++)
{
cout<<"\n";
cout<<"vvedite 1 dlya broska\n";
cin>>num;
srednee_vashe+=gen();
b=gen();
cout<<"y vas vipalo                    ";kub(b);cout<<"\n";
cout<<"vvedite 1 dlya broska komputera\n";
cin>>num;
b=gen();
cout<<"y komputera vipalo              ";kub(b);cout<<"\n";
srednee_komp+=gen();

}
const float sr_v=srednee_vashe/5;
const float sr_k=srednee_komp/5;
cout<<"vashe srednee  "<< sr_v<<"\n";
cout<<"srednee komputera  "<< sr_k<<"\n";
if(sr_v>sr_k)
{cout<<"you win\n";}
else if(sr_v<sr_k)
{cout<<"you lost\n";}
else {cout<<"nichiya\n";}
	}
int main()
{int a; cout<<"viberete kto kidaet 1-vi 2-komp ";
srand(time(NULL));
cin>>a;
igra(a);
        
}